package com.dragon.flow.enm.model;

import java.io.Serializable;

/**
 * @title:
 * @author: bruce.liu
 * @since: 2024/9/10 10:59
 */
public enum ModelStatusEnum implements Serializable {

    DRAFT("draft", "草稿"), WAIT_PUBLISH ("wait_publish", "待发布"), PUBLISH("publish", "发布"), STOP("stop", "停用");

    private String status;
    private String name;

    public static String getName(String status) {
        if (null == status) {
            return null;
        }
        for (ModelStatusEnum item : values()) {
            if (status.equals(item.getStatus())) {
                return item.getName();
            }
        }
        return null;
    }

    ModelStatusEnum(String status, String name) {
        this.status = status;
        this.name = name;
    }

    public String getStatus() {
        return status;
    }

    public String getName() {
        return name;
    }
}
